package com.piccolo.wrapper.client.component.JSNI;

import com.piccolo.wrapper.client.component.Overlay.PBoundsOverlay;

public class PBoundsJSNI 
{
	public native PBoundsOverlay create(double theX, double theY, double theWidth, double theHeight) 
	/*-{ return new $wnd.PBounds({x: theX, y: theY, width: theWidth, height: theHeight}); }-*/;

	public native double getX(PBoundsOverlay self) 
	/*-{ return self.x; }-*/;

	public native double getY(PBoundsOverlay self) 
	/*-{ return self.y; }-*/;
	
	public native double getWidth(PBoundsOverlay self) 
	/*-{ return self.width; }-*/;
	
	public native double getHeight(PBoundsOverlay self) 
	/*-{ return self.height; }-*/;

	public native boolean isEmpty(PBoundsOverlay self) 
	/*-{ return self.isEmpty(); }-*/;

	public native void add(PBoundsOverlay self, double theX, double theY, double theWidth, double theHeight) 
	/*-{ self.add({x: theX, y: theY, height: theHeight, width: theWidth}); }-*/;

	public native boolean contains(PBoundsOverlay self, double theX, double theY) 
	/*-{ return self.contains({x: theX, y: theY}); }-*/;

	public native boolean intersects(PBoundsOverlay self, PBoundsOverlay bounds) 
	/*-{ return self.intersects(bounds); }-*/;
}
